package com.ckv.qcm.view.trainees;

import java.util.ArrayList;

import javax.swing.JPanel;
import javax.swing.JTextField;

import org.jdesktop.swingx.HorizontalLayout;

import com.ckv.qcm.model.Promotion;
import com.ckv.qcm.model.Trainee;
import com.ckv.qcm.view.Utils.ListPanel;

public class UI_GestStagiaires extends JPanel {
	private JTextField txtNom;
	private JTextField txtPrenom;
	private JTextField txtEmail;
	private int width = 200;
	private int height = 300;
	private JPanel PromoPanel;
	private ListPanel PromoList;
	private JPanel StagPromoPanel;
	private ListPanel StagPromoList;
	private JPanel StagPanelGlobal;
	private JPanel StagPanel;
	private JPanel InfoPanel;
	private ListPanel StagList;

	public UI_GestStagiaires() {

		super();
	

		initComponent();
		

	}
public UI_GestStagiaires(int width,int height)
{
	this.width=width;
	this.height=height;
	
	initComponent();
}
	
	private void initComponent()
	{
		setLayout(new HorizontalLayout());
		
		PromoPanel= new JPanel();
		this.add(PromoPanel,0);
		
		//StagList = new ListPanel();
		//StagList.setBounds(10, 79, 135, 244);
		//PromoPanel.add(StagList);
	}
	
	private void loadPromotions() {
		ArrayList<Promotion> promotions = new ArrayList<Promotion>();
	}

	private void loadStagiaires() {
		ArrayList<Trainee> stagiaires = new ArrayList<Trainee>();
		stagiaires = Trainee.findAll();
		for (Trainee stagiaire : stagiaires) {
			StagiairePanel stgPanel = new StagiairePanel(stagiaire);
			//StagList.addPanel(stgPanel);
		}
	}
}
